home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1996 / MacHack 1996.toast / Hacks / Hacks ’92 / FinderMenu ƒ / <FinderMenu> / FinderMenuPrivate.h < prev   
Encoding:
C/C++ Source or Header  |  1995-09-10  |  1.4 KB  |  49 lines  |  [TEXT/KAHL]

  1. #pragma once
  2.  
  3. /*
  4.  * (C) 1992 SixxHeads Software
  5.  * (C) 1992 Berkeley Systems
  6.  * 
  7.  * This code is freely distributable, but credit must be given in any
  8.  * derivative work.
  9.  *
  10.  * This is private information for the back end of
  11.  * the FinderMenu extension.  Clients should
  12.  * use the interfaces provided in FinderMenuInterface.h
  13.  * 
  14.  * <Revision History>
  15.  *        04/28/92 smz Created.
  16.  */
  17.  
  18. #include "Utils.h"
  19.  
  20. typedef enum {
  21.     eInitFinderMenu,
  22.     eAppendMenu,
  23.     eDeleteMenus,
  24.     eRemoveEntry,
  25.      eClientFinished,
  26.      eFreshMenuBar,
  27.      eRollBeachball
  28. } FinderMenuDispatchCode;
  29.  
  30. typedef long (*FMDispatchProc)(short selector, OSType creator, ...);
  31.  
  32. /*
  33.  * private globals
  34.  */
  35. extern FMDispatchProc    theDispatchProc;
  36. extern OSType             theCreatorID;
  37.  
  38. /*
  39.  * These functions are declared as C in the interfaces, but actually overridden
  40.  * by these macros.
  41.  */
  42. #define FMAppend(hm, bf)        (*theDispatchProc)(eAppendMenu, theCreatorID, hm, bf)
  43. #define FMDeleteMenus()            (*theDispatchProc)(eDeleteMenus, theCreatorID)
  44. #define FMRemove()                (*theDispatchProc)(eRemoveEntry, theCreatorID)
  45. #define FMGetHit()                (MenuHitHandle) (*theDispatchProc)(eGetMenuHitInfo, theCreatorID)
  46. #define FMDisposeHitList(hh)    (*theDispatchProc)(eDisposeHitInfo, theCreatorID, hh)
  47. #define FMFreshMenuBar()        (*theDispatchProc)(eFreshMenuBar, theCreatorID)
  48. #define FMRollBeachball()        (*theDispatchProc)(eRollBeachball, theCreatorID)
  49. #define FMFinishedProcessing()    (*theDispatchProc)(eClientFinished, theCreatorID)